<!DOCTYPE html>
<html lang="{{ @this->lang() }}">
<head>
    <include href="blocks/head.html" />
</head>
<body>
<include href="blocks/navbar.html" />
<div class="container">
    <div class="clearfix">
        <div class="pull-right">
            <a href="{{ @BASE }}/admin/users/new" class="btn btn-default btn-sm"><span class="fa fa-plus"></span>&ensp;{{ @dict.new_user }}</a>
        </div>
        <include href="blocks/admin/tabs.html" />
    </div>
    <p>
        <a class="btn btn-link btn-sm" href="{{ @BASE }}/admin/users"><span class="fa fa-chevron-left"></span>&ensp;Back</a>
        &ensp;<b>Deactivated Users</b>
    </p>
    <table class="table table-striped table-condensed">
        <thead>
            <tr>
                <th data-sort="int">{{ @dict.cols.id }}</th>
                <th data-sort="string">{{ @dict.username }}</th>
                <th data-sort="string">{{ @dict.email }}</th>
                <th data-sort="string">{{ @dict.name }}</th>
                <th data-sort="string">{{ @dict.role }}</th>
                <th data-sort="string">{{ @dict.task_color }}</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <repeat group="{{ @users }}" value="{{ @user }}">
                <tr>
                    <td>{{ @user.id }}</a></td>
                    <td>{{ @user.username | esc }}</td>
                    <td>{{ @user.email | esc }}</td>
                    <td>{{ @user.name | esc }}</td>
                    <td>{{ ucfirst(@user.role) }}</td>
                    <td><span class="badge" style="background-color: #{{ @user.task_color }};">&ensp;</span>&ensp;#{{ @user.task_color }}</td>
                    <td>
                        <form action="{{ @BASE }}/admin/users/{{ @user.id }}/undelete" method="post">
                            <csrf-token />
                            <button type="submit" class="has-tooltip" title="{{ @dict.reactivate }}">
                                <span class="fa fa-repeat" style="transform: scaleX(-1);"></span>
                            </button>
                        </form>
                    </td>
                </tr>
            </repeat>
        </tbody>
    </table>
    <include href="blocks/footer.html" />
    <script src="{{ @BASE }}/js/stupidtable.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $('.table').stupidtable();
    });
    </script>
</div>
</body>
</html>
